$this->db->where('EmpID >=', 5); $query = $this->db->get('Employees'); echo $query->num_rows(); // Outputs, 4